package model

import (
	mssql "github.com/denisenkom/go-mssqldb"
	"time"
)

// 数据库中年检分表s
type Apply_AS struct {
	ID        int       `gorm:"primary-key;column:id"`
	CID       int       `gorm:"column:cid"`
	UID       int       `gorm:"column:uid"`
	ApplyTime time.Time `gorm:"column:apply_time"`
	State     int       `gorm:"column:state"`
	File      int       `gorm:"column:File"`
	CPID      int       `gorm:"column:CPid"`
	Remark1   string    `gorm:"column:remark1"`
	Remark2   string    `gorm:"column:remark2"`
}

// 展示给管理员
type ASApplies struct {
	ID            int       `json:"id"`
	ApplyID       int       `json:"apply_id"`
	ApplyTime     time.Time `json:"applyTime"`
	UID           int       `json:"uid"`
	UName         string    `json:"uname"`
	CName         string    `json:"cname"`
	File          AllFile   `json:"file"`
	CPID          int       `json:"CPID"`
	CPName        string    `json:"CPName"`
	ApprovalState int       `json:"approval_state"`
}

type IssueAS struct {
	CPID      int       `gorm:"primary-key;column:CPID"`
	CPName    string    `gorm:"column:CPName"`
	ATID      int       `gorm:"column:ATID"`
	Publisher int       `gorm:"column:Publisher"`
	PTime     time.Time `gorm:"column:PTime"`
	Year      int       `gorm:"column:Year"`
	State     int       `gorm:"column:State"`
}

type ShowAS struct {
	Cid       int           `json:"cid"`
	CName     string        `json:"CName"`
	CPID      int           `json:"CPid"`
	CPName    string        `json:"CPName"` //年检主题
	FileID    int           `json:"FileID"`
	FileName  mssql.VarChar `json:"FileName"`
	FileUrl   mssql.VarChar `json:"FileUrl"`
	Year      int           `json:"year"`
	IssueTime time.Time     `json:"issueTime"`
	State     int           `json:"state"`
}
